package com.yanrumiao.entity;

import cc.uncarbon.framework.crud.entity.HelioBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;

/**
 * 支付信息
 */
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName(value = "payment")
public class PaymentEntity extends HelioBaseEntity<Long> {
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "订单编号")
    @TableField(value = "order_no")
    private String orderNo;

    @Schema(description = "用户id")
    @TableField(value = "user_id")
    private Long userId;


    @Schema(description = "付款方式")
    @TableField(value = "pay_way")
    private Integer payWay;

    @Schema(description = "交易编号（微信或支付）")
    @TableField(value = "transaction_id")
    private String transactionId;

    @Schema(description = "支付金额")
    @TableField(value = "amount")
    private BigDecimal amount;

    @Schema(description = "交易内容")
    @TableField(value = "content")
    private String content;


    @Schema(description = "0-未支付 1-已支付 -1-关闭交易")
    @TableField(value = "status")
    private Integer status;

    @Schema(description = "回调时间")
    @TableField(value = "callback_time")
    private Date callbackTime;

    @Schema(description = "回调信息")
    @TableField(value = "callback_content")
    private Integer callbackContent;
}
